Skip to main content

Text Exist

AutomatR.Web.TextExists

The "Text Exist" activity in AutomatR is designed for UI automation workflows, allowing you to check if a specified text is present within a given UI element. This activity is useful for verifying the presence of expected text on a webpage.

Properties

NameDescription
Input
TextSpecifies the text to be searched for on the webpage. Enter a string representing the text you want to verify. String variables containing the text to be searched.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Text Exist" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
TimeoutSpecifies the maximum time (in seconds) to wait for the activity to be executed before throwing an exception. This prevents the activity from running indefinitely. Integer variables containing the timeout duration. Ex.: If the maximum time is 5000 milliseconds or 5 sec, i.e., 5. Default: Common.Constants.Timeout
Output
ResultOutputs a Boolean value indicating whether the specified text exists within the UI element. Variables of relevant types (e.g., Boolean variables) to store the result.

How to use:

  1. Drag and drop the "Text Exist" activity onto the workflow.
  2. Configure the properties based on the desired behavior:
    • Provide the text to be searched for (Text).
    • Optionally, set a delay before executing the activity (Delay).
    • Optionally, set a maximum timeout for the activity (Timeout).
  3. Execute the workflow to check if the specified text exists on the webpage.

Example: Consider an example where the "Text Exist" activity is used to check if the text "Welcome to AutomatR" exists on a webpage with a timeout of 10 seconds:

Text Exist:
Text: "Welcome to AutomatR"
Delay: 2 (seconds)
Timeout: 10 (seconds)
Result: isTextFound

In this example, the activity checks if the specified text is found on the webpage, with a delay of 2 seconds and a maximum timeout of 10 seconds. The result of the check is stored in the Boolean variable "isTextFound" for further use in the workflow.